package com.jwpdk.tagframework;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.tagext.TagSupport;

/**
 * 标签库  后期集成个UI库再做细化
 * @author 王志伟
 *
 */
public class JwpdkTag extends TagSupport{

	private static final long serialVersionUID = 5182893097912671269L;
	
	protected static final String HTML_EDIT_PAGE_ISEND="HTML_EDIT_PAGE_ISEND";//html编辑器的js
	protected static final String HTML_EDIT_PAGE_POTJS="HTML_EDIT_PAGE_POTJS";//pot的js
	protected static final String TABLE_JS="TABLE_JS";//pot的js
	protected static final String COLOR_JS="COLOR_JS";//pot的js
	protected static final String FHTML_EDIT_PAGE_ISEND="FHTML_EDIT_PAGE_ISEND";//html编辑器的js
	protected static final String DBGRID_EDIT_PAGE_ISEND="DBGRID_EDIT_PAGE_ISEND";//Dbgrid
	protected static final String FORM_HTML_JS="FORM_HTML_JS";//Dbgrid
	protected static final String path = "";
	
	protected boolean isend(HttpServletRequest request,String key){
		if(request.getAttribute(key)==null || request.getAttribute(key).equals(false))
			return true;
		else
			return false;
	}
	protected String basepath(HttpServletRequest request){
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
		return basePath;
	}
}
